import { router } from '@ruifox-cms/utils'

// 内容管理的侧边栏为自定义侧边栏，需要对路由特殊处理
// const content2Route = router.getRoutes().find(route => route.path === '/content2')
// const children = content2Route?.children || []
// const meta = content2Route?.meta || {}

// if (content2Route) {
//     router.removeRoute(content2Route.name || content2Route.path)
// }

// // 找到index路由
// const indexRoute = router.getRoutes().find(route => route.name === 'index')
// if (indexRoute) {
//     // 将content2路由添加到index的children中
//     indexRoute.children.push({
//         path: 'content2',
//         name: 'Content2',
//         component: () => import('@/views/content2/ContentIndex.vue'),
//         meta,
//         children: children
//     })
//     // 同时使用addRoute确保路由被正确注册
//     router.addRoute('index', {
//         path: 'content2',
//         name: 'Content2',
//         component: () => import('@/views/content2/ContentIndex.vue'),
//         meta,
//         children: children
//     })
// }

export default router